<?php

if(isset($_FILES['avatar'])) {
	echo "<pre>";
	print_r($_FILES);
	move_uploaded_file(
		$_FILES['avatar']['tmp_name'],
		'uploads/'.$_FILES['avatar']['name']
	);
}
?>
<form action="" method="post" enctype="multipart/form-data">
	<input type="file" name="avatar">
	<input type="submit" value="Please Upload" />
</form>
